<template>
	<view class="box">
		<view class="text">¥: {{ rechargeMoney }}元</view>
		<QRCode v-if="url" :param="param" type="ZFB" :text="url" :logo="getStaticFilePath('/home/wd/logo_ZFB.png')" />
	</view>
</template>

<script>
import QRCode from '@/components/qrcode/qrcode.vue';

export default {
	components: {
		QRCode,
	},
	data() {
		return {
			url: '',
			rechargeMoney: "",
			payPhone: '',
			payisChannel: 2,
			id:'',
			param: '',
		}
	},
	onLoad(option) {
		this.url = decodeURIComponent(option.url)
		console.log('url',this.url);
		this.rechargeMoney = option.payMore
		this.payPhone = option.payPhone
		this.payisChannel = option.payisChannel
		this.id = option.id
		//生成链接
		let param = {
			type: 0,
			summary: `¥: ${this.rechargeMoney}元`,  //描述
			href: `${this.url}payPhone=${this.payPhone}&payMore=${this.rechargeMoney}&payisChannel=${this.payisChannel}&id=${this.id}&type=ZFB`,
		};
		this.param = param
	},
	methods: {

	},
};
</script>

<style lang="scss">
.box {
	padding-top: 88rpx;

	.text {
		text-align: center;
		font-size: 40rpx;
	}
}
</style>